package com.example.boot1.service.impl;

import com.example.boot1.util.DateUtil;
import org.springframework.stereotype.Service;

import org.springframework.beans.factory.annotation.Autowired;

import com.example.boot1.bean.VueStaff;
import com.example.boot1.mapper.VueStaffMapper;
import com.example.boot1.service.VueStaffService;

import java.util.List;

@Service
public class VueStaffServiceImpl implements VueStaffService{

    @Autowired
    private VueStaffMapper vueStaffMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return vueStaffMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(VueStaff record) {
        return vueStaffMapper.insert(record);
    }

    @Override
    public int insertSelective(VueStaff record) {
        record.setTime(DateUtil.getStringDate());
        return vueStaffMapper.insertSelective(record);
    }

    @Override
    public VueStaff selectByPrimaryKey(Integer id) {
        return vueStaffMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(VueStaff record) {
        return vueStaffMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(VueStaff record) {
        return vueStaffMapper.updateByPrimaryKey(record);
    }

    @Override
    public VueStaff findByStaffNo(String staffNo) {
        return vueStaffMapper.findByStaffNo(staffNo);
    }

    @Override
    public List<VueStaff> getStaff(Integer pageOffSetNum) {
        return vueStaffMapper.getStaff(pageOffSetNum);
    }

    @Override
    public int findAllTotal() {
        return vueStaffMapper.findAllTotal();
    }

    @Override
    public long deleteByIds(List<Long> ids) {
        return vueStaffMapper.deleteByIds(ids);
    }

}
